package cn.cnf.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 转账记录
 *
 * @author ZhuMeiYi
 * @since 2021-01-10 23:11:44
 * @description 
 */
@EqualsAndHashCode(callSuper = true)
@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@TableName("money_record")
public class MoneyRecord extends Model<MoneyRecord> implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId(type = IdType.UUID)
	private String id;
    /**
     * 来源用户
     */
    private String fromId;
    /**
     * 来源用户名
     */
    private String fromName;
    /**
     * 去向用户
     */
    private String toId;
    /**
     * 去向用户名
     */
    private String toName;
    /**
     * 充值金额
     */
    private BigDecimal num;
    /**
     * 记录类型/转账1/抽成2/充值0
     */
    private Integer type;
    /**
     * 充值时间
     */
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

}